package edu.aynu.cyloc.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author haha
 * @since 2021-09-26 21:40:56
 */
@Data
public class User extends Model<User> {
    //主键
    private Long id;
    //姓名
    private String name;
    //学号
    private String sno;
    //年级
    private Integer grade;
    //学院id
    private Integer collegeId;
    //班级id
    private Integer classId;
    //是否已学习
    @TableField("is_study")
    private Boolean study;
    //是否开启使用
    @TableField("is_open")
    private Boolean open;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
